from tkinter import *
X = int(input("введите начальную координату X: "))
Y = int(input("введите начальную координату Y: "))
I = int(input("введите коэффициент увеличения N: "))
coords = [0, 0, 10, 0, 10, 10, 20, 10, 20, 20, 0, 20]
if N==0 and X>=0 and X<=500 and Y>=0 and Y<=500:
   pass
else:
   if I>0 and 0*I+X>=0 and 0*I+Y>=0 and 20*I+X<=500 and 20*I+Y<=500:
       pass
   else:
       if I<0 and 20*I+X>=0 and 20*I+Y>=0 and 0*I+X<=500 and 0*I+Y<=500:
           pass
       else:
           print("Размер фигуры превышает максимальный размер поля")
           exit()
root=Tk()
root.title("ИТ марафон")
root.geometry("500x500")
canvas=Canvas(bg="white",width="500", height="500")
canvas.pack(anchor=CENTER, expand=1)
canvas.create_polygon(coords[0] *I+X, coords[1] *I+Y,
                   coords[2] *I+X, coords[3] *I+Y,
                   coords[4] *I+X, coords[5] *I+Y,
                   coords[6] *I+X, coords[7] *I+Y,
                   coords[8] *I+X, coords[9] *I+Y,
                   coords[10] *I+X, coords[11] *I+Y)
root.mainloop()
